-- GENERATED SPELL FOR [Doomguard Punisher] --


function spell0_23113(pUnit, Event) --@Consume Essence,Heal--
pUnit:FullCastSpellOnTarget(40565,pUnit)
pUnit:RegisterEvent('Sorts_23113', 0, 1)
end

function spell1_23113(pUnit, Event) --@Fel Flames,n/a--
pUnit:FullCastSpellOnTarget(40561,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_23113', 15000, 1)
end

function spell2_23113(pUnit, Event) --@Punishing Blow,n/a--
pUnit:FullCastSpellOnTarget(40560,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_23113', 10000, 1)
end

function spell3_23113(pUnit, Event) --@Super Jump,n/a--
pUnit:FullCastSpellOnTarget(40493,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_23113', 0, 1)
end

function spell4_23113(pUnit, Event) --@Throw Axe,n/a--
pUnit:FullCastSpellOnTarget(40563,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_23113', 3000, 1)
end

function Sorts_23113(pUnit, Event)
local choix_sorts_23113 = math.random(0, 4)
if choix_sorts_23113 == 0 then
pUnit:RegisterEvent('spell0_23113', 1, 1)
end
if choix_sorts_23113 == 1 then
pUnit:RegisterEvent('spell1_23113', 1, 1)
end
if choix_sorts_23113 == 2 then
pUnit:RegisterEvent('spell2_23113', 1, 1)
end
if choix_sorts_23113 == 3 then
pUnit:RegisterEvent('spell3_23113', 1, 1)
end
if choix_sorts_23113 == 4 then
pUnit:RegisterEvent('spell4_23113', 1, 1)
end
end

function mob23113_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_23113', math.random(1500, 3000), 1)
end

function mob23113_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob23113_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob23113_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(23113, 1, 'mob23113_Action')
RegisterUnitEvent(23113, 2, 'mob23113_Leave')
RegisterUnitEvent(23113, 3, 'mob23113_Kill')
RegisterUnitEvent(23113, 4, 'mob23113_Die')
